//
//  GRToolKit.h
//  woxiu
//
//  Created by mac on 14-4-10.
//  Copyright (c) 2014年 GR. All rights reserved.
//使用此类，在工程pch文件里面加入该头文件，即可在工程内任意地方进行创建

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define PINK  @"0xF3,0x2D,0x63"
// 获得RGB颜色
#define GRColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
enum {
    UIDevice_ScreenSize_3_5      = 1,
    UIDevice_ScreenSize_4        = 2,
    UIDevice_ScreenSize_4_7      = 3,
    UIDevice_ScreenSize_5_5      = 4,
}; typedef NSInteger UIDeviceScreenSize;
@interface GRToolKit : NSObject
#pragma mark --判断屏幕尺寸
+ (UIDeviceScreenSize)judegeScreenSize;
#pragma mark --创建Label
+(UILabel*)createLabelWithFrame:(CGRect)frame Font:(int)font Text:(NSString*)text;
#pragma mark --创建View
+(UIView*)viewWithFrame:(CGRect)frame;
#pragma mark --创建imageView
+(UIImageView*)createImageViewWithFrame:(CGRect)frame ImageName:(NSString*)imageName;
#pragma mark --创建button
+(UIButton*)createButtonWithFrame:(CGRect)frame ImageName:(NSString*)imageName Target:(id)target Action:(SEL)action Title:(NSString*)title;
#pragma mark --创建UITextField
+(UITextField*)createTextFieldWithFrame:(CGRect)frame placeholder:(NSString*)placeholder passWord:(BOOL)YESorNO leftImageView:(UIImageView*)imageView rightImageView:(UIImageView*)rightImageView Font:(float)font;

//适配器的方法  扩展性方法
//现有方法，已经在工程里面存在，如果修改工程内所有方法，工作量巨大，就需要使用适配器的方法
+(UITextField*)createTextFieldWithFrame:(CGRect)frame placeholder:(NSString*)placeholder passWord:(BOOL)YESorNO leftImageView:(UIImageView*)imageView rightImageView:(UIImageView*)rightImageView Font:(float)font backgRoundImageName:(NSString*)imageName;
#pragma mark 创建UIScrollView
+(UIScrollView*)makeScrollViewWithFrame:(CGRect)frame andSize:(CGSize)size;
#pragma mark 创建UIPageControl
+(UIPageControl*)makePageControlWithFram:(CGRect)frame;
#pragma mark 创建UISlider
+(UISlider*)makeSliderWithFrame:(CGRect)rect AndImage:(UIImage*)image;
#pragma mark 创建时间转换字符串
+(NSString *)stringFromDateWithHourAndMinute:(NSDate *)date;
#pragma mark --判断导航的高度64or44
+(float)isIOS7;

#pragma mark 内涵图需要的方法
+ (NSString *)stringDateWithTimeInterval:(NSString *)timeInterval;

+ (CGFloat)textHeightWithString:(NSString *)text width:(CGFloat)width fontSize:(NSInteger)fontSize;

+ (NSString *)addOneByIntegerString:(NSString *)integerString;

#pragma mark 获取16进制颜色
//注意colorString的格式：@"0xF3,0x2D,0x63"
+(UIColor *)convertHexadecimalColor:(NSString *)colorString;
#pragma mark 获取一条细线
+(UIView *)createLineWithColor:(UIColor *)color  x:(NSInteger)x  y:(NSInteger)y  width:(NSInteger)width;
+(UIImageView *)createIVLineWithImage:(NSString *)imageName x:(NSInteger)x  y:(NSInteger)y  width:(NSInteger)width;


#pragma mark 获取一条细线
+(UIView *)createHorizontalLineWithColor:(UIColor *)color  x:(NSInteger)x  y:(NSInteger)y  width:(NSInteger)width boder:(CGFloat)border;
+(UIView *)createHorizontalLineWithColor:(UIColor *)color  x:(NSInteger)x  y:(NSInteger)y  width:(NSInteger)width;
/**
 *  字符串的rect
 *
 *  @param maxWidth 字符串能达到的最大宽度
 *  @param font     设定该字符串的字体
 */
- (CGRect)gr_rectWithMaxWidth:(CGFloat)maxWidth font:(UIFont *)font;
@end
